﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteWithControlAccess.Master"
    Inherits="System.Web.Mvc.ViewPage<IQueryable<ProjetoComperio.DataLayer.Entities.Application>>" %>

<%@ Import Namespace="ProjetoComperio.Framework.Web.Security.UrlEncrypt" %>
<%@ Import Namespace="ProjetoComperio.DataLayer.Entities" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Aplicação
    </h2>               
    <div class="Grid">        
       <%= Html.Grid(Model).Columns(
            column => 
            {
                column.For(x => x.Title).Named("Titulo");
                column.For(x => x.IsOpenSource).Named("É OpenSource");
                column.For(x => x.IsFree).Named("É Livre");
                column.For(x => x.RegisterDate.ToString("dd/MM/yyyy")).Named("Data de cadastro");
                column.For(x => Html.ActionLink("Ver", "Details", new { id = URLEncrypt.EncryptToString(x.ContributionID.ToString()) })
                       ).DoNotEncode().Attributes(x => new Hash(style => "font-weight:bold"));
            }).Attributes(Style =>  "width:100%").Empty("Não existem aplicações cadastradas.")
    %>    
    </div>
    <br />
    <br />
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="head" runat="server">
</asp:Content>
